package com.tree.thrive.business.event;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.ApplicationListener;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

/**
 * @Auther: cheng.tang
 * @Date: 2024/10/25
 * @Description: top-tree
 */
@Component
@Slf4j
public class CustomEventListenerAsync implements ApplicationListener<CustomEvent> {

    @Async
    @Override
    public void onApplicationEvent(CustomEvent event) {
        log.info(" Received custom event - {} ", event.getMessage());
    }

}
